
'''	
	This file is part of Arendal.
	
	Copyright (C) 2008	Mohamed Hazem <mohamed.hazem@student.guc.edu.eg>

	
	Arendal is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Arendal is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Arendal.	If not, see <http://www.gnu.org/licenses/>.
'''


from PyQt4.QtCore import QVariant, Qt, SIGNAL, QString, QStringList
from PyQt4.QtSql import QSqlDatabase, QSqlQuery
from PyQt4.QtGui import QWidget, QApplication, QLineEdit, QHBoxLayout, QVBoxLayout, QLabel, QPushButton, QMessageBox, QGridLayout, QCompleter
import sys
from manageEventsForAdmin import manageEventsForAdmin
from manageUsers import manageUsers


class adminView(QWidget):
	def __init__(self, userID):
		QWidget.__init__(self)
		self.userID = userID
		self.setWindowTitle("Admin View")

		self.manageEventsButton = QPushButton("Manage Events")
		self.connect(self.manageEventsButton, SIGNAL("clicked()"), self.manageEvents)

		manageUsers = QPushButton("Manage User")
		self.connect(manageUsers, SIGNAL("clicked()"), self.manageUsers)
		
		grid = QGridLayout()
		grid.addWidget(self.manageEventsButton)
		grid.addWidget(manageUsers)

		self.setLayout(grid)
		self.show()

	def manageEvents(self):
		self.manageWindow = manageEventsForAdmin()

	def manageUsers(self):
		self.manageUsersWindow = manageUsers()